/* * Ext JS Library 2.2 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ // Sample desktop configuration var vbytru; var instructionSite; MyDesktop = new Ext.app.App({ init :function(){ Ext.QuickTips.init(); }, getModules : function(){ return [ new MyDesktop.SiteEditModule(), new MyDesktop.MenuModule(), new MyDesktop.BogusMenuModule(), new MyDesktop.BogusModule() ]; }, // config for the start menu getStartConfig : function(){ return { title: 'Lenik CMS', iconCls: 'user', width:300, toolItems: [ //{ // text:'Настройки', // iconCls:'Настройки', // scope:this, // width:300 // } // , //'-' //, { text:'Выход', iconCls:'Выход', scope:this, handler : exitFunction } ] }; } }); exitFunction=function() { document.location='/admin/modules/logout.php'; } MyDesktop.GridWindow = Ext.extend(Ext.app.Module, { id:'win-instruction', init : function(){ this.launcher = { text: 'Интструкция', iconCls:'icon-grid', frameW:"/admin/instruction/", handler : createWindow, scope: this } } }); // for example purposes var windowIndex = 0; MyDesktop.BogusModule = Ext.extend(Ext.app.Module, { init : function(){ this.launcher = { text: 'Материалы', iconCls:'попус', handler: function() { return false; }, scope: this, windowId:windowIndex, menu: { items:[ { text: 'разделы', iconCls:'bogus', handler : this.createWindow, frameW:"/admin/content/section/", scope: this, windowId: windowIndex }, { text: 'категории', iconCls:'bogus', handler : this.createWindow, frameW:"/admin/content/categories/", scope: this, windowId: windowIndex }, { text: 'все материалы', iconCls:'bogus', handler : this.createWindow, frameW:"/admin/content/", scope: this, windowId: windowIndex } ] } } }, createWindow : function(src){ var desktop = this.app.getDesktop(); var win = desktop.getWindow('окно'+src.windowId); if(!win){ win = desktop.createWindow({ id: 'окно'+src.frameW, title:src.text, width:'100%', height:768, html : '